<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php
$document = &JFactory::getDocument();
$document->addScript( 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js' );
$document->addCustomTag( '<script type="text/javascript">jQuery.noConflict();</script>' );
echo JhtraqHelper::drawTabs($this->project->slug);
?>
<!-- the jQuery -->
<script type="text/javascript">
<!--
jQuery(document).ready(function($){
	$('#viewDiff').click(function(){
        var url = 'index.php?option=com_jhtraq&view=svn&project=googlecode&action=diff&path=';
        url = url + '<?php echo(urlencode($this->path)); ?>';
        url = url + '&rev1=' + escape($('#rev1').val());
        url = url + '&rev2=' + escape($('#rev2').val());
    	location.href=url;
    });
});
//-->
</script> 
<p></p>
<div class="componentheading">
<?php echo $this->project->name; ?> - <?php echo JText::_('COM_JHTRAQ_SVN');?> <?php echo JText::_('COM_JHTRAQ_FILE');?>: <?php echo basename($this->path);?>
</div>
<p><b><?php echo JText::_('COM_JHTRAQ_FILE_FULL_PATH');?>: <?php echo($this->path);?></b></p>
<div>
	<fieldset id="ticket_columns">
	<legend><?php echo JText::_('COM_JHTRAQ_COMPARE_REVISIONS')?></legend>
	<table width="100%">
	    <tr>
		    <td>
		        <label for="rev1"><?php echo JText::_('COM_JHTRAQ_REV1');?></label>
		    </td>
		    <td>
			    <input type="text" name="rev1" id="rev1" />
		    </td>
		 </tr>
		 <tr>
		    <td>
		        <label for="status"><?php echo JText::_('COM_JHTRAQ_REV2');?></label>
		    </td>
		    <td>
			    <input type="text" name="rev2" id="rev2">
		    </td>
		 </tr>
	</table>
	<div style="float:right">
	    <input type="submit" id="viewDiff" name="viewDiff" value="<?php echo JText::_('COM_JHTRAQ_SHOW_DIFF')?>" />
	</div>	    
    </fieldset>
 
</div>
<div style="width:100%; height:300px;overflow:auto">
<?php
jimport('geshi.geshi');
$ftype = substr($this->path, -3, 3); // f
geshi_highlight($this->file, $ftype);
?>
</div>
